CREATE TABLE [dbo].[TDCORE_TECR]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_COMP_RETE] [dbo].[TD_VC_020] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCORE_TE__NU_SE__44EA3301] DEFAULT ((0)),
[TI_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU] [dbo].[TD_VC_020] NOT NULL,
[FE_EMIS] [dbo].[TD_DT_001] NOT NULL,
[IM_TOTA_CONV] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCORE_TE__IM_TO__45DE573A] DEFAULT ((0)),
[IM_PAGO_CONV] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCORE_TE__IM_PA__46D27B73] DEFAULT ((0)),
[IM_RETE_CONV] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDCORE_TE__IM_RE__47C69FAC] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCORE_TE__CO_US__48BAC3E5] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCORE_TE__FE_US__49AEE81E] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCORE_TE__CO_US__4AA30C57] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCORE_TE__FE_US__4B973090] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCORE_TECR] ADD CONSTRAINT [PK__TDCORE_T__01C4F6C12F7AE026] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_COMP_RETE], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCORE_TECR] ADD CONSTRAINT [FK__TDCORE_TECR__3EA8151D] FOREIGN KEY ([CO_EMPR], [NU_COMP_RETE]) REFERENCES [dbo].[TCCORE_TECR] ([CO_EMPR], [NU_COMP_RETE])
GO
